Desalt the cod at least for 8 hours by changing the water several times. Place the cod in a pan with cold water, bring to a boil, cover and remove from heat. Leave to poach for 20 minutes. Remove any skin or other parts from the cod and flake. During this time sautÄ the onions in the butter at moderate heat to avoid becoming too brown. Boil the potatoes in their skins until soft but not overcooked when sliced. In the middle of an ovenproof dish place the flaked cod. Circle it with the potatoes, salt and pepper the onions and spread over the cod and the potatoes. Pour in the cream, cook in a 350F oven until the top begins to brown, around 25 minutes. Serve hot.